package gptma.bo.services.request;

import gptma.bo.model.employee.Employee;
import gptma.bo.model.request.ClientRequest;
import gptma.bo.model.request.RequestEvaluation;
import gptma.bo.model.request.RequestHistoryElement;
import gptma.bo.model.task.Task;
import gptma.bo.search.ClientRequestSearchCriteria;

import java.util.List;
import java.util.Set;

import javax.ejb.Local;

@Local
public interface ClientRequestServices {

	List<ClientRequest> findAll();

	List<ClientRequest> findToBeTreated();

	List<ClientRequest> findNonAttached();

	List<Employee> findAssignedEmployees(ClientRequest clientRequest);

	List<String> completeRequestReference(String partialReference);

	float[] getRequestCharge(ClientRequest clientRequest);

	List<ClientRequest> findByCriteria(ClientRequestSearchCriteria criteria);

	float getSoldRequestCharge(ClientRequest clientRequest);

	List<String> getModifiableStatus(ClientRequest clientRequest);

	List<ClientRequest> findNewRequests(int number);

	List<Task> findTasks(ClientRequest clientRequest);

	ClientRequest findByReference(String reference);

	List<RequestHistoryElement> findHistory(ClientRequest clientRequest);

	void storeRequestAndDependencies(ClientRequest clientRequest,
			RequestEvaluation requestEvaluation,
			Set<RequestHistoryElement> history);

	void saveClientRequest(ClientRequest clientRequest);
}
